﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Web.Repositories;

namespace Web.Controllers
{
    public class HomeController : Controller
    {
        CategoriaRepository categoriaRepository = new CategoriaRepository();
        public ActionResult Index()
        {
            ViewBag.Categorias = categoriaRepository.GetAll();
            return View();
        }

        public ActionResult About()
        {
            return View();
        }

        public ActionResult Error(string error, string volver)
        {
            ViewBag.Error = error;
            ViewBag.Return = volver;
            return View();
        }
    }
}
